package part3.c19_emp.employee;

import part3.c19_emp.payment_classification.PaymentClassification;
import part3.c19_emp.payment_method.PaymentMethod;
import part3.c19_emp.payment_schedule.PaymentSchedule;

/**
 * Created by lie on 2018/3/29.
 * 雇员
 * 采用策略模式
 * 而不是简单的派生出3种雇员
 */
public class Employee {
    private int empId;
    private String itsAddress;
    private String itsName;

    private PaymentMethod pm;
    private PaymentClassification classification;
    private PaymentSchedule schedule;

    public Employee(int empId, String itsAddress, String itsName) {
        this.empId = empId;
        this.itsAddress = itsAddress;
        this.itsName = itsName;
    }

    public void setPaymentMethod(PaymentMethod method){
        this.pm = method;
    }

    public void setPaymentClassification(PaymentClassification classification){
        this.classification = classification;
    }

    public void setPaymentSchedule(PaymentSchedule schedule){
        this.schedule = schedule;
    }

    public PaymentMethod getPaymentMethod() {
        return pm;
    }

    public PaymentClassification getClassification() {
        return classification;
    }

    public PaymentSchedule getSchedule() {
        return schedule;
    }

    public String getName() {
        return itsName;
    }
}
